package com.iweb.manager.service;

import com.iweb.manager.dao.TicketMapper;
import com.iweb.manager.model.tickets;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TicketServiceImpl implements TicketService{
    @Autowired
    TicketMapper ticketMapper;
    @Override
    public List<tickets> queryAll() {
        return ticketMapper.queryAll();
    }

    @Override
    public List<tickets> queryByShowId(int show_id) {
        return ticketMapper.queryByShowId(show_id);
    }

    @Override
    public int addOne(tickets tickets) {
        return ticketMapper.addOne(tickets);
    }

    @Override
    public int deleteOne(int ticket_id) {
        return ticketMapper.deleteOne(ticket_id);
    }

    @Override
    public int editOne(tickets tickets) {
        return ticketMapper.editOne(tickets);
    }
}
